/*
 * @Author: your name
 * @Date: 2021-02-24 11:18:35
 * @LastEditTime: 2021-05-18 13:38:57
 * @LastEditors: zhangjingyu
 * @Description: In User Settings Edit
 * @FilePath: \vprisk10.14\src\api\ftpManage\pricingTaskApi.js
    每个接口请写注释说明！！
 */
// 引入工具类
import axios from "../config";

// 使用
const URL = "api-ftp"; // 公共前缀地址
export const pricingTask = {
  findAll(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/findAll", data);
  },

  save(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/save", data);
  },

  checkPositionUnique(data) {
    return axios.post(
      URL + "/ftp/pricingManage/pricingTask/checkPositionUnique",
      data
    );
  },

  checkTaskCodeUnique(data) {
    return axios.post(
      URL + "/ftp/pricingManage/pricingTask/checkTaskCodeUnique",
      data
    );
  },

  findAllEnable(data) {
    return axios.post(URL + "/ftp/position/findAllEnable", data);
  },

  toForm(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/toForm", data);
  },

  remove(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/remove", data);
  },

  toMonitor(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/toMonitor", data);
  },

  queryCount(data) {
    return axios.post(
      URL + "/ftp/pricingManage/pricingRecordBlock/queryCount",
      data
    );
  },

  toRecord(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/toRecord", data);
  },

  findAllRecord(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingRecord/findAll", data);
  },

  toBlock(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/toBlock", data);
  },

  findAllSubRecord(data) {
    return axios.post(
      URL + "/ftp/pricingManage/pricingSubRecord/findAll",
      data
    );
  },

  findAllBlock(data) {
    return axios.post(
      URL + "/ftp/pricingManage/pricingRecordBlock/findAll",
      data
    );
    },
  //校验用户是否有机构权限
  checkCurrentOrganPrivilege() {
      return axios.post(
          URL + "/ftp/positionResult/result/checkCurrentOrganPrivilege"
      );
  },

  toExcute(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/toExcute", data);
  },
  // 获取头寸表list数据
  findPositionTableList() {
    return axios.post(URL + "/ftp/positionResult/result/findPositionTableList");
  },

  findAllResult(data) {
    return axios.post(URL + "/ftp/positionResult/result/findAll", data);
  },

  findAllSceneTask(data) {
    return axios.post(URL + "/ftp/pricingManage/sceneTask/findAll", data);
  },

  queryAllEnable() {
    //查询情景
    return axios.post(URL + "/ftp/sceneManage/queryAllEnable");
  },

  checkSceneTaskCodeUnique(data) {
    //
    return axios.post(
      URL + "/ftp/pricingManage/sceneTask/checkTaskCodeUnique",
      data
    );
  },

  saveSceneTask(data) {
    //
    return axios.post(URL + "/ftp/pricingManage/sceneTask/save", data);
  },

  removeSceneTask(data) {
    //
    return axios.post(URL + "/ftp/pricingManage/sceneTask/remove", data);
  },

  toBlockSceneTask(data) {
    return axios.post(URL + "/ftp/pricingManage/sceneTask/toBlock", data);
  },

  toFormResult(data) {
    return axios.post(URL + "/ftp/positionResult/result/toForm", data);
  },
  // 头寸表查询
  positionFindAllEnable(data) {
    return axios.post(URL + "/ftp/position/findAllEnable", data);
  },
  // 过滤条件下拉
  queryListForCombogrid(data) {
    return axios.post(URL + "/ftp/businessEle/queryListForCombogrid", data);
  },
  // 通过元素字段值或者标识字段值获取相关业务口径
  findDataByElementField(data) {
    return axios.post(
      URL + "/ftp/businessEle/findDataByElementField",
      data,
      false
    );
  },
  //   // 跳转筛选数据
  // sceneTasktoSiftForm(data) {
  //   return axios.post(URL + '/ftp/pricingManage/sceneTask/toSiftForm', data)
  // },
  // 情景筛选数据
  sceneTaskSiftData(data) {
    return axios.post(URL + "/ftp/pricingManage/sceneTask/siftData", data);
  },
  // 情景历史筛选数据表格分页查询
  sceneTaskConditionFindHistory(data) {
    // return axios.post(URL + '/ftp/sceneManage/findHistory', data)
    return axios.post(
      URL + "/ftp/pricingManage/sceneTaskCondition/findAll",
      data
    );
  },
  // 情景定价筛选条件删除
  sceneTaskConditionRemove(data) {
    return axios.post(
      URL + "/ftp/pricingManage/sceneTaskCondition/remove",
      data
    );
  },
  // 情景查看筛选数据查询
  sceneTaskViewDataQuery(data) {
    return axios.post(
      URL + "/ftp/pricingManage/sceneTask/queryPdStockForPage",
      data
    );
  },
  // 情景执行定价
  sceneTaskExcute(data) {
    return axios.post(URL + "/ftp/pricingManage/sceneTask/excute", data);
  },
  // 情景查看数据筛选全部删除
  sceneTaskRemoveDataByTaskCode(data) {
    return axios.post(
      URL + "/ftp/pricingManage/sceneTask/removeDataByTaskCode",
      data
    );
  },
  // 情景查看数据筛选删除
  sceneTaskRemove(data) {
    return axios.post(
      URL + "/ftp/pricingManage/sceneTask/removeDataByAccNum",
      data
    );
  },
  findSceneCodeList() {
    return axios.post(URL + "/ftp/sceneResult/findSceneCodeList");
  },
  // 情景定价查看结果- 查询
  sceneResult(data) {
    return axios.post(URL + "/ftp/sceneResult/findAll", data);
  },

 // 情景定价查询头寸信息接
 sceneTaskToViewData(data) {
  return axios.post(URL + "/ftp/pricingManage/sceneTask/toViewData", data);
},
  sceneResultForm(data) {
    return axios.post(URL + "/ftp/sceneResult/toForm", data);
  },

  toMonitorScene(data) {
    return axios.post(URL + "/ftp/pricingManage/sceneTask/toMonitor", data);
  },
  excutes(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/excute", data);
  },
  //停止日常定价
  pricingStop(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/stop", data);
  },
  //停止情景定价
  sceneStop(data) {
    return axios.post(URL + "/ftp/pricingManage/sceneTask/stop", data);
  },
  //停止历史重定价
  repricingStop(data) {
    return axios.post(URL + "/ftp/pricingManage/repricingTask/stop", data);
  },
  // ************************************* 历史业务重定价**********************************
  // 主表查询
  repricingTaskFindAll(data) {
    return axios.post(URL + "/ftp/pricingManage/repricingTask/findAll", data);
  },
  // 检查taskSd
  repricingTaskCheckTaskSd(data, loading = false) {
    return axios.post(
      URL + "/ftp/pricingManage/repricingTask/checkTaskSd",
      data,
      loading
    );
  },
  // 检查taskCode
  repricingTaskCheckTaskCodeUnique(data, loading = false) {
    return axios.post(
      URL + "/ftp/pricingManage/repricingTask/checkTaskCodeUnique",
      data,
      loading
    );
  },
  // 历史重定价保存
  repricingTaskSave(data) {
    return axios.post(URL + "/ftp/pricingManage/repricingTask/save", data);
  },
  // 历史重定价删除
  repricingTaskRemove(data) {
    return axios.post(URL + "/ftp/pricingManage/repricingTask/remove", data);
  },
  // 历史重定价执行定价
  repricingTaskExcute(data) {
    return axios.post(URL + "/ftp/pricingManage/repricingTask/excute", data);
  },
  // 重定价筛选数据历史筛选条件查询
  repricingTaskConditionFindAll(data) {
    return axios.post(
      URL + "/ftp/pricingManage/repricingTaskCondition/findAll",
      data
    );
  },
  // 重定价里筛选条件删除
  repricingTaskConditionRemove(data) {
    return axios.post(
      URL + "/ftp/pricingManage/repricingTaskCondition/remove",
      data
    );
  },
  // 重定价筛选数据
  repricingTaskSiftData(data) {
    return axios.post(URL + "/ftp/pricingManage/repricingTask/siftData", data);
  },
  // 重定价查看数据筛选查询
  repricingTaskQueryPdStockForPage(data) {
    return axios.post(
      URL + "/ftp/pricingManage/repricingTask/queryPdStockForPage",
      data
    );
  },
  // 重定价查看数据筛选删除
  repricingTaskRemoveDataByAccNum(data) {
    return axios.post(
      URL + "/ftp/pricingManage/repricingTask/removeDataByAccNum",
      data
    );
  },
  // 重定价查看数据筛选全部删除
  repricingTaskRemoveDataByTaskCode(data) {
    return axios.post(
      URL + "/ftp/pricingManage/repricingTask/removeDataByTaskCode",
      data
    );
  },

  // 重定价任务监控查询
  repricingQueryCount(data) {
    return axios.post(
      URL + "/ftp/pricingManage/pricingRecordBlock/queryCount",
      data
    );
  },
  // 重定价获取pricingCode
  toMonitorRepricing(data) {
    return axios.post(URL + "/ftp/pricingManage/repricingTask/toMonitor", data);
  },

  // 重定价任务执行记录查询
  pricingRecordFindAll(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingRecord/findAll", data);
  },

  // 重定价子任务查询
  pricingSubRecordFindAll(data) {
    return axios.post(
      URL + "/ftp/pricingManage/pricingSubRecord/findAll",
      data
    );
  },
  //重定价跳转子任务的时候查到的上方列表的的数据
  pricingTasktoBlock(data) {
    return axios.post(URL + "/ftp/pricingManage/pricingTask/toBlock", data);
  },

  // 重定价引擎任务查询
  pricingRecordBlockFindAll(data) {
    return axios.post(
      URL + "/ftp/pricingManage/pricingRecordBlock/findAll",
      data
    );
  },
  //重定价查看结果 查询
  repricingResult(data) {
    return axios.post(
      URL + "/ftp/positionResult/repricingresult/findAll",
      data
    );
  },
  // 重定价更新结果
  repricingUpdateResult(data) {
    return axios.post(
      URL + "/ftp/pricingManage/repricingTask/updateResult",
      data
    );
  },
  //重定价查看详情
  reResultForm(data) {
    return axios.post(URL + "/ftp/positionResult/repricingresult/toForm", data);
  },
  //导出执行记录
  excuteRecord(data) {
    return axios.exportFile(URL + "/ftp/pricingManage/pricingRecord/exp", data);
  },
  //导出日常定价结果
  expResult(data) {
    return axios.exportFile(URL + "/ftp/positionResult/result/exp", data);
  },
  //导出情景定价结果
  expSceneResult(data) {
    return axios.exportFile(URL + "/ftp/sceneResult/exp", data);
  },
  //导出历史重定价结果
  expreResult(data) {
    return axios.exportFile(
      URL + "/ftp/positionResult/repricingresult/exp",
      data
    );
  },
  //一键导入导出表单查询
  tableFindAll(data) {
    return axios.post(URL + "/ftp/tableData/findAll", data);
  },
  //一键导出
  expreTable(data) {
    return axios.exportFile(URL + "/ftp/tableData/exportParam", data);
  },

  //一键导入
  tableImp(data) {
    return axios.fileUpload(URL + "/ftp/tableData/imp", data, false);
  },
  //日常定价结果查看现金流
  pricingCashFlow(data) {
    return axios.post(URL + "/ftp/positionResult/result/showCashFlow", data);
  },
};
